OpenStack Mitaka : Configure Heat#1
2016/05/12 |
Install OpenStack Orchestration Service (Heat).
This example shows to install Orchestration Services on the existing environment like follows.
For example, install and configure Orchestration Services on the Network Node. | +------------------+ | +------------------------+ | [ Control Node ] | | | [ Network Node ] | | Keystone |10.0.0.30 | 10.0.0.50| DHCP,L3,L2 Agent | | Glance |------------+------------| Metadata Agent | | Nova API |eth0 | eth0| Heat API,API-CFN | | Neutron Server | | | Heat Engine | +------------------+ | +------------------------+ eth0|10.0.0.51 +--------------------+ | [ Compute Node ] | | Nova Compute | | L2 Agent | +--------------------+ |
Add users or databases for Heat services on the Control Node on this section.
|
|
[1] | Install required packages first. |
[root@dlp ~(keystone)]# yum --enablerepo=centos-openstack-mitaka,epel -y install openstack-heat-common
|
[2] | Add users and so on for Heat services in Keystone on the Control Node. |
# add Heat user [root@dlp ~(keystone)]# openstack user create --domain default --project service --password servicepassword heat +--------------------+----------------------------------+ | Field | Value | +--------------------+----------------------------------+ | default_project_id | 4a80b177558b49d7a58038770a344aeb | | domain_id | dc18e12756a54ce7aea35e99f01decd8 | | enabled | True | | id | 2c55950ff5b542a28d0a9155b78d640f | | name | heat | +--------------------+----------------------------------+ # add Heat user to admin role [root@dlp ~(keystone)]# openstack role add --project service --user heat admin
# create a role for Heat [root@dlp ~(keystone)]# openstack role create heat_stack_owner +-----------+----------------------------------+ | Field | Value | +-----------+----------------------------------+ | domain_id | None | | id | b0e0ce0251544cdb85c5c316ae8a9df1 | | name | heat_stack_owner | +-----------+----------------------------------+[root@dlp ~(keystone)]# openstack role create heat_stack_user +-----------+----------------------------------+ | Field | Value | +-----------+----------------------------------+ | domain_id | None | | id | 4ffcb170e6bc4ce6ad6fe481153bc7e9 | | name | heat_stack_user | +-----------+----------------------------------+ # add admin user to heat_stack_owner role [root@dlp ~(keystone)]# openstack role add --project admin --user admin heat_stack_owner
# create service entry for Heat [root@dlp ~(keystone)]# openstack service create --name heat --description "Openstack Orchestration" orchestration +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | Openstack Orchestration | | enabled | True | | id | 0f563f5d121d46c99ae5cb0c480f2d71 | | name | heat | | type | orchestration | +-------------+----------------------------------+[root@dlp ~(keystone)]# openstack service create --name heat-cfn --description "Openstack Orchestration" cloudformation +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | Openstack Orchestration | | enabled | True | | id | 941667fe78ce446db5471358afe6ce78 | | name | heat-cfn | | type | cloudformation | +-------------+----------------------------------+ # define Heat API server's IP [root@dlp ~(keystone)]# heat_api=10.0.0.50
# create endpoint entry for orchestration (public) [root@dlp ~(keystone)]# openstack endpoint create --region RegionOne orchestration public http://$heat_api:8004/v1/%\(tenant_id\)s +--------------+----------------------------------------+ | Field | Value | +--------------+----------------------------------------+ | enabled | True | | id | 83c57dabc180446e9c969216f51c561b | | interface | public | | region | RegionOne | | region_id | RegionOne | | service_id | 0f563f5d121d46c99ae5cb0c480f2d71 | | service_name | heat | | service_type | orchestration | | url | http://10.0.0.50:8004/v1/%(tenant_id)s | +--------------+----------------------------------------+ # create endpoint entry for orchestration (internal) [root@dlp ~(keystone)]# openstack endpoint create --region RegionOne orchestration internal http://$heat_api:8004/v1/%\(tenant_id\)s +--------------+----------------------------------------+ | Field | Value | +--------------+----------------------------------------+ | enabled | True | | id | f49b97f254dd4c96a347bd8b452cbfc4 | | interface | internal | | region | RegionOne | | region_id | RegionOne | | service_id | 0f563f5d121d46c99ae5cb0c480f2d71 | | service_name | heat | | service_type | orchestration | | url | http://10.0.0.50:8004/v1/%(tenant_id)s | +--------------+----------------------------------------+ # create endpoint entry for orchestration (admin) [root@dlp ~(keystone)]# openstack endpoint create --region RegionOne orchestration admin http://$heat_api:8004/v1/%\(tenant_id\)s +--------------+----------------------------------------+ | Field | Value | +--------------+----------------------------------------+ | enabled | True | | id | 11d237b9bdac4e5595987c6b465f5e05 | | interface | admin | | region | RegionOne | | region_id | RegionOne | | service_id | 0f563f5d121d46c99ae5cb0c480f2d71 | | service_name | heat | | service_type | orchestration | | url | http://10.0.0.50:8004/v1/%(tenant_id)s | +--------------+----------------------------------------+ # create endpoint entry for cloudformation (public) [root@dlp ~(keystone)]# openstack endpoint create --region RegionOne cloudformation public http://$heat_api:8000/v1 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | 2229c38423b549fe81d44802404adb75 | | interface | public | | region | RegionOne | | region_id | RegionOne | | service_id | 941667fe78ce446db5471358afe6ce78 | | service_name | heat-cfn | | service_type | cloudformation | | url | http://10.0.0.50:8000/v1 | +--------------+----------------------------------+ # create endpoint entry for cloudformation (internal) [root@dlp ~(keystone)]# openstack endpoint create --region RegionOne cloudformation internal http://$heat_api:8000/v1 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | 40275ed9374f4bc2ba544ed0431d3093 | | interface | internal | | region | RegionOne | | region_id | RegionOne | | service_id | 941667fe78ce446db5471358afe6ce78 | | service_name | heat-cfn | | service_type | cloudformation | | url | http://10.0.0.50:8000/v1 | +--------------+----------------------------------+ # create endpoint entry for cloudformation (admin) [root@dlp ~(keystone)]# openstack endpoint create --region RegionOne cloudformation admin http://$heat_api:8000/v1 +--------------+----------------------------------+ | Field | Value | +--------------+----------------------------------+ | enabled | True | | id | 0270f42932cf43889d993150b2f107bb | | interface | admin | | region | RegionOne | | region_id | RegionOne | | service_id | 941667fe78ce446db5471358afe6ce78 | | service_name | heat-cfn | | service_type | cloudformation | | url | http://10.0.0.50:8000/v1 | +--------------+----------------------------------+ # create Heat domain [root@dlp ~(keystone)]# openstack domain create --description "Stack projects and users" heat +-------------+----------------------------------+ | Field | Value | +-------------+----------------------------------+ | description | Stack projects and users | | enabled | True | | id | 7712f42ca8fd41888d02cafaa2cf6b53 | | name | heat | +-------------+----------------------------------+ # create "heat_domain_admin" user [root@dlp ~(keystone)]# openstack user create --domain heat --password servicepassword heat_domain_admin +-----------+----------------------------------+ | Field | Value | +-----------+----------------------------------+ | domain_id | 7712f42ca8fd41888d02cafaa2cf6b53 | | enabled | True | | id | bea81848cd0d4775baf23e73a34042e0 | | name | heat_domain_admin | +-----------+----------------------------------+ # add "heat_domain_admin" user to admin role [root@dlp ~(keystone)]# openstack role add --domain heat --user heat_domain_admin admin
|
[3] | Create a database for Heat to MariaDB. |
[root@dlp ~(keystone)]# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 38 Server version: 5.5.47-MariaDB MariaDB Server Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
create database heat; Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on heat.* to heat@'localhost' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on heat.* to heat@'%' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
MariaDB [(none)]> flush privileges; Query OK, 0 rows affected (0.00 sec) exit Bye |